function textFieldRequired(field, errorMessage){
	if (!field)
		throw Error('textFieldRequired - field param is invalid.');

	field.val(field.val().trim());

	if (field.val().length == 0) {
		field.focus();
		alert(errorMessage);
		return false;
	}

	return true;
}

function selectFieldRequired(field, errorMessage){
	if (!field)
		throw Error('selectFieldRequired - field param is invalid.');

	if(field.val().trim().length == 0) {
		field.focus();
		alert(errorMessage);
		return false;
	}
	return true;
}
